int Count_Digit(int N,int D)
{
  	int i,k=0;
do
	{
		i=N%10;
		if(i<0)
		i=-i;
		if(i==D)
		k++;
		N=N/10;
	}while(N!=0);
	return k;
}